#include <iostream>
#include <vector>

int C(int n, int k) {
    int d = n - k;
    std::vector<int> fs;


    for (int i = 1; i <= d / i; ++i) { 
        if (d % i == 0) {
            fs.push_back(i);
            if (i != d / i) {
                fs.push_back(d / i);
            }
        }
    }

    int count = 0;
  
    for (int x : fs) {
        if (x <= n && x > k) {
            ++count;
        }
    }

    return count;
}

int main() {
    int n, k;
    std::cin >> n >> k; 
    std::cout << C(n, k) << std::endl; 
    return 0;
}